// 类的修饰符

export {}

interface fds{}

class Person {
  public name: string
  private age: number
  protected gender: number

  constructor(name: string, age: number) {
    this.name = name
    this.age = age
    this.gender = 1
  }

  sayHi(msg: string) : string {
    return this.name + msg
  }
  
}

class Student extends Person {
  private constructor(name: string, age: number) {
    super(name, age)
    console.log(this.gender)
  }

  static create(name: string, age: number) {
    return new Student(name, age)
  }
}

const tom = new Person("tom", 18)
console.log(tom.name)

const stt = Student.create("fds", 31)